package com.jiyinit.web.core.business.entity;

import com.jiyinit.core.framework.base.entity.BaseEntity;
import com.jiyinit.core.framework.base.util.Check;
import com.jiyinit.web.core.common.config.PropertyPlaceholderConfigurer;

import java.util.Date;

public class TabUserFriendEntity extends BaseEntity {
    /**
     * 编号
     */
    private Integer userFriendId;

    /**
     * 用户编号
     */
    private Integer userId;

    /**
     * 朋友Id
     */
    private Integer friendId;

    /**
     * 状态 0:已同意 1：待同意  2：黑名单
     */
    private Integer status;

    /**
     * 创建者ID
     */
    private Integer createId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后修改人
     */
    private Integer lastModifyId;

    /**
     * 最后修改时间
     */
    private Date lastModifyTime;

    /**
     * 扩展字段1
     */
    private String attribute1;

    /**
     * 扩展字段2
     */
    private String attribute2;

    /**
     * 扩展字段3
     */
    private String attribute3;

    private Integer friendGroupId;

    private String friendGroupName;

    private Integer num;

    private String friendName;

    /**
     * 用户头像图片名称
     */
    private String avatar;

    /**
     * 用户手机
     */
    private String userMobileNo;

    private String taskId;

    public String getFriendName() {
        return friendName;
    }

    public void setFriendName(String friendName) {
        this.friendName = friendName;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getFriendGroupName() {
        return friendGroupName;
    }

    public void setFriendGroupName(String friendGroupName) {
        this.friendGroupName = friendGroupName;
    }

    public Integer getFriendGroupId() {
        return friendGroupId;
    }

    public void setFriendGroupId(Integer friendGroupId) {
        this.friendGroupId = friendGroupId;
    }

    public Integer getUserFriendId() {
        return userFriendId;
    }

    public void setUserFriendId(Integer userFriendId) {
        this.userFriendId = userFriendId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getFriendId() {
        return friendId;
    }

    public void setFriendId(Integer friendId) {
        this.friendId = friendId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getLastModifyId() {
        return lastModifyId;
    }

    public void setLastModifyId(Integer lastModifyId) {
        this.lastModifyId = lastModifyId;
    }

    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    public String getAttribute1() {
        return attribute1;
    }

    public void setAttribute1(String attribute1) {
        this.attribute1 = attribute1 == null ? null : attribute1.trim();
    }

    public String getAttribute2() {
        return attribute2;
    }

    public void setAttribute2(String attribute2) {
        this.attribute2 = attribute2 == null ? null : attribute2.trim();
    }

    public String getAttribute3() {
        return attribute3;
    }

    public void setAttribute3(String attribute3) {
        this.attribute3 = attribute3 == null ? null : attribute3.trim();
    }

    public String getAvatar() {
        if(!Check.isNullStr(avatar))
        {
            String picPath = (String) PropertyPlaceholderConfigurer.getContextProperty("USER_AVATAR");
            return picPath+avatar;
        }
        else
        {
            return "";
        }
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getUserMobileNo() {
        return userMobileNo;
    }

    public void setUserMobileNo(String userMobileNo) {
        this.userMobileNo = userMobileNo;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }
}